package com.lvyq.qrobot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lvyq.qrobot.entity.SysBarrier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysBarrierMapper extends BaseMapper<SysBarrier> {
    @Select("select * from sys_barrier where type = #{type} ORDER BY sort ASC")
    List<SysBarrier> listByType(@Param("type") int type);

    @Select("select * from sys_barrier where name = #{barrier}")
    SysBarrier selectByName(@Param("barrier") String barrier);
}
